@echo off
echo 设置Cython编译环境...

set DISTUTILS_USE_SDK=1
set VS_ROOT=D:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
set MSVC_VER=14.44.35207

set VS170COMNTOOLS=%VS_ROOT%\Common7\Tools\
set VCINSTALLDIR=%VS_ROOT%\VC\
set PATH=%VS_ROOT%\VC\Tools\MSVC\%MSVC_VER%\bin\Hostx64\x64;%PATH%

echo 测试编译器...
cl 2>nul
if %errorlevel% neq 0 (
    echo 编译器设置失败
    pause
    exit /b 1
)
echo 编译器设置成功！

echo 安装依赖...
pip install cython numpy

echo 编译Cython模块...
python build_cython.py

echo 完成！
pause 